An Automated Refactoring Approach to Design Pattern-Based Program Transformations in Java Programs

نویسندگان

  • Sang-Uk Jeon
  • Joon-Sang Lee
  • Doo-Hwan Bae
چکیده

Software often needs to be modified for accommodating requirements changes through the software life cycle. To deal with several accidental requirements changes related to software maintenance, a systematic and safe approach to modifying softwares is needed. The design patterns provide a high degree of design flexibility for such accidental requirements changes. In this paper, we propose an automated approach to refactoring based on design patterns in Java programs. In our approach, for a particular design pattern, we define an inference rule to automatically identify a set of candidate spots and a refactoring strategy to transform one of the set of candidate spots into the desired design pattern structure. A candidate spot may be a class or a set of classes to which the design patterns can be applied. We believe that our approach would be helpful to the maintainers in the sense that much of manual analysis on source code can be reduced, and the fashion of automated program transformation preserves the behavior of the original program by means of the refactoring technique.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Enhanced semi-Automated Refactoring Engine with Behavioral testing

Refactoring is a transformation that preserves the external behavior of a program and improves its internal quality. Usually, compilation errors and behavioral changes are avoided by preconditions determined for each refactoring transformation. However, to formally define these preconditions and transfer them to program checks is a rather complex task. In practice, refactoring engine developers...

متن کامل

A Model-driven Approach to Program Refactoring

Refactoring object-oriented programs along with their associated models usually involve complex maintenance efforts, in order to keep those artifacts correct and up to date. Most projects abandon design information in the form of models early in the life cycle, as their sustentation turns out extremely expensive. In this paper, we propose an approach for refactoring object-oriented programs by ...

متن کامل

Automated Design Improvement by Example

The high cost of software maintenance could potentially be reduced by automatically improving the design of object-oriented programs without altering their behaviour. We have constructed a software tool capable of refactoring objectoriented programs to conform more closely to design quality models based on a set of metrics, by formulating the task as a search problem in the space of alternative...

متن کامل

Refactoring and Retrofitting Design Patterns in Java Software Product Lines

A centerpiece of modern software development is refactoring. Software Product Lines (SPLs), a major software development paradigm, lack tools to refactor Java SPL codebases. X15 introduces our new set of design guidelines, techniques, and language constructs to (1) express feature-based Java SPLs using only Java custom annotations, (2) view programs of the SPL, (3) edit views, automatically pro...

متن کامل

Secure Refactoring - Improving the Security Level of Existing Code

Software security is ever-increasingly becoming a serious issue; nevertheless, a large number of software programs are still defenseless against malicious attacks. This paper proposes a new class of refactoring, which is called secure refactoring. This refactoring is not intended to improve the maintainability of existing code. Instead, it helps programmers to increase the protection level of s...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2002